import * as mongoose from 'mongoose';
import db from './../core/lib/db/mongodb';


let messageSchema: mongoose.Schema = new mongoose.Schema(
    {
        corpId: String,
        title: String,
        auhter: String,
        content: String,
        imgUrl: String,
        isTop: Boolean,
        isSecret: Boolean,
        date : Date
    }, { collection: 'message' });
export interface Message extends mongoose.Document {
    corpId: string;
    title: string;
    auhter: string;
    content: string;
    imgUrl: string;
    isTop: boolean;
    isSecret: boolean;
    date : Date;
}
export let messageModel = db.model<Message>('message', messageSchema);
